package cn.cloudplug.core.manage.picture;

import java.io.File;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.LinkedList;

/**
 * Created by pc on 2018/1/23.
 */

public class PicInfoPacket{
    private LinkedHashMap<File,LinkedList<File>> folder_pic = new LinkedHashMap<>();
    private ArrayList<File> all_pic = new ArrayList<>();
    public void add(String imgPath){
        File file = new File(imgPath);
        File parent= file.getParentFile();
        LinkedList<File> list=folder_pic.get(parent);
        if(list==null){
            list=new LinkedList<>();
            folder_pic.put(parent,list);
        }
        list.add(file);
        all_pic.add(file);
    }

    public LinkedHashMap<File, LinkedList<File>> getData() {
        return folder_pic;
    }
    public  ArrayList<File> getAllPic() {
        return all_pic;
    }
}
